<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>set_iterator - ClueLib</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/prettify.js"></script></head><body class="FramedContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.52 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="set_iterator"></a>set_iterator</h1><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>class set_iterator #(</td><td class="PType  prettyprint " nowrap>type&nbsp;</td><td class="PParameter  prettyprint " nowrap>T</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%> int</td><td class="PAfterParameters  prettyprint "nowrap>) extends iterator#( T )</td></tr></table></td></tr></table></blockquote><p>Provides an iterator to a <a href="cl_set-svh.html#set" class=LClass id=link10 onMouseOver="ShowTip(event, 'tt2', 'link10')" onMouseOut="HideTip('tt2')">set</a>.</p><h4 class=CHeading>Parameter</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>T</td><td class=CDLDescription><span class="optional">optional</span> The type of data collected in a <a href="cl_set-svh.html#set" class=LClass id=link11 onMouseOver="ShowTip(event, 'tt2', 'link11')" onMouseOut="HideTip('tt2')">set</a>.&nbsp; The default is <b>int</b>.</td></tr></table><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#set_iterator" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">set_iterator</a></td><td class=SDescription>Provides an iterator to a <a href="cl_set-svh.html#set" class=LClass id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">set</a>.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#set_iterator.Types" >Types</a></td><td class=SDescription></td></tr><tr class="SType SIndent2 SMarked"><td class=SEntry><a href="#set_iterator.aa_type" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">aa_type</a></td><td class=SDescription>The shorthand of the associative array type of type <b>T</b>.</td></tr><tr class="SType SIndent2"><td class=SEntry><a href="#set_iterator.set_type" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">set_type</a></td><td class=SDescription>The shorthand of the <a href="cl_set-svh.html#set" class=LClass id=link5 onMouseOver="ShowTip(event, 'tt2', 'link5')" onMouseOut="HideTip('tt2')">set</a> type of type <b>T</b>.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#set_iterator.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#set_iterator.new" id=link6 onMouseOver="ShowTip(event, 'tt5', 'link6')" onMouseOut="HideTip('tt5')">new</a></td><td class=SDescription>Creates a set iterator.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#set_iterator.has_next" id=link7 onMouseOver="ShowTip(event, 'tt6', 'link7')" onMouseOut="HideTip('tt6')">has_next</a></td><td class=SDescription><span class="virtual">virtual</span> Returns 1 if the iterator has more elements.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#set_iterator.next" id=link8 onMouseOver="ShowTip(event, 'tt7', 'link8')" onMouseOut="HideTip('tt7')">next</a></td><td class=SDescription><span class="virtual">virtual</span> Returns the next element.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#set_iterator.remove" id=link9 onMouseOver="ShowTip(event, 'tt8', 'link9')" onMouseOut="HideTip('tt8')">remove</a></td><td class=SDescription><span class="virtual">virtual</span> Removes the last element returned by the iterator. </td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="set_iterator.Types"></a>Types</h3></div></div>

<div class="CType"><div class=CTopic><h3 class=CTitle><a name="set_iterator.aa_type"></a>aa_type</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">typedef bit aa_type[T]</td></tr></table></blockquote><p>The shorthand of the associative array type of type <b>T</b>.</p></div></div></div>

<div class="CType"><div class=CTopic><h3 class=CTitle><a name="set_iterator.set_type"></a>set_type</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>typedef set#(</td><td class="PParameter  prettyprint " nowrap>T</td><td class="PAfterParameters  prettyprint "nowrap>) set_type</td></tr></table></td></tr></table></blockquote><p>The shorthand of the <a href="cl_set-svh.html#set" class=LClass id=link12 onMouseOver="ShowTip(event, 'tt2', 'link12')" onMouseOut="HideTip('tt2')">set</a> type of type <b>T</b>.</p></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="set_iterator.Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="set_iterator.new"></a>new</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function new(</td><td class="PType  prettyprint " nowrap>set_type&nbsp;</td><td class="PParameter  prettyprint " nowrap>s</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates a set iterator.</p><h4 class=CHeading>Argument</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>s</td><td class=CDLDescription>A set to be iterated.</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="set_iterator.has_next"></a>has_next</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">virtual function bit has_next()</td></tr></table></blockquote><p><span class="virtual">virtual</span> Returns 1 if the iterator has more elements.</p><h4 class=CHeading>Returns</h4><p>If the iterator has more elements, returns 1.&nbsp; Otherwise, returns 0.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="set_iterator.next"></a>next</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">virtual function T next()</td></tr></table></blockquote><p><span class="virtual">virtual</span> Returns the next element.</p><h4 class=CHeading>Returns</h4><p>The next element in the iterator.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="set_iterator.remove"></a>remove</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">virtual function void remove()</td></tr></table></blockquote><p><span class="virtual">virtual</span> Removes the last element returned by the iterator.&nbsp; This function can be called once per call to <a href="#set_iterator.next" class=LFunction id=link13 onMouseOver="ShowTip(event, 'tt7', 'link13')" onMouseOut="HideTip('tt7')">next</a>.</p></div></div></div>

</div><!--Content-->



<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CClass><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>class set_iterator #(</td><td class="PType  prettyprint " nowrap>type&nbsp;</td><td class="PParameter  prettyprint " nowrap>T</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%> int</td><td class="PAfterParameters  prettyprint "nowrap>) extends iterator#( T )</td></tr></table></td></tr></table></blockquote>Provides an iterator to a set.</div></div><div class=CToolTip id="tt2"><div class=CClass><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>class set #(</td><td class="PType  prettyprint " nowrap>type&nbsp;</td><td class="PParameter  prettyprint " nowrap>T</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%> int</td><td class="PAfterParameters  prettyprint "nowrap>) extends set_base#( T )</td></tr></table></td></tr></table></blockquote>Implements the set_base using an associative array.</div></div><div class=CToolTip id="tt3"><div class=CType><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">typedef bit aa_type[T]</td></tr></table></blockquote>The shorthand of the associative array type of type <b>T</b>.</div></div><div class=CToolTip id="tt4"><div class=CType><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>typedef set#(</td><td class="PParameter  prettyprint " nowrap>T</td><td class="PAfterParameters  prettyprint "nowrap>) set_type</td></tr></table></td></tr></table></blockquote>The shorthand of the set type of type <b>T</b>.</div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function new(</td><td class="PType  prettyprint " nowrap>set_type&nbsp;</td><td class="PParameter  prettyprint " nowrap>s</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Creates a set iterator.</div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">virtual function bit has_next()</td></tr></table></blockquote><span class="virtual">virtual</span> Returns 1 if the iterator has more elements.</div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">virtual function T next()</td></tr></table></blockquote><span class="virtual">virtual</span> Returns the next element.</div></div><div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">virtual function void remove()</td></tr></table></blockquote><span class="virtual">virtual</span> Removes the last element returned by the iterator. </div></div><!--END_ND_TOOLTIPS-->

<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>